package cn.tedu.proxy.client;

import cn.tedu.proxy.service.OrderService;
import cn.tedu.proxy.service.OrderServiceImpl;
import cn.tedu.proxy.service.OrderServiceImplSub;
import cn.tedu.proxy.service.OrderServiceProxy;

public class Test {
    public static void main(String[] args) {
        /*OrderServiceImplSub orderServiceImplSub = new OrderServiceImplSub();
        orderServiceImplSub.generate();
        orderServiceImplSub.modify();
        orderServiceImplSub.detail();*/

        //创建目标对象
        OrderServiceImpl target = new OrderServiceImpl();
        //创建代理对象
        OrderServiceProxy proxy = new OrderServiceProxy(target);
        //调用代理对象的代理方法
        proxy.generate();
        proxy.modify();
        proxy.detail();

    }
}
